﻿@using Webdiyer.WebControls.Mvc
@model Webdiyer.WebControls.Mvc.PagedList<Webapi.Models.LicenceCode>
<div class="page-header">
    <a class="btn btn-primary navbar-btn" href="/control/edit">新增</a>
</div>
<div class="table-responsive">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>标题</th>
                <th>标识</th>
                <th>密钥</th>
                <th>状态</th>
                <th>有效期</th>
                <th>添加时间</th>
                <th>备注</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>@item.L_Title</td>
                    <td>@item.L_ProId</td>
                    <td>@item.L_Code</td>
                    <td>
                        @if (item.L_State == 0)
                        {
                            <span class="label label-success">正常</span>
                        }
                        else
                        {
                            <span class="label label-danger">冻结</span>
                        }
                    </td>
                    <td>@item.L_TimeUseful</td>
                    <td>@item.L_Time</td>
                    <td>@item.L_Remark</td>
                    <td>
                        <a class="btn btn-info" href="/control/edit/@item.L_Id">编辑</a>
                        <a class="btn btn-warning" href="/control/remove/@item.L_Id">删除</a>
                    </td>
                </tr>
            }
        </tbody>
    </table>
    @Html.Pager(Model, new PagerOptions { FirstPageText = "首页", PrevPageText = "上一页", NextPageText = "下一页", LastPageText = "末页", PageIndexParameterName = "pn", NumericPagerItemCount = 5, ContainerTagName = "ul", CssClass = "pagination", CurrentPagerItemTemplate = "<li class=\"active\"><a href=\"#\">{0}</a></li>", DisabledPagerItemTemplate = "<li class=\"disabled\"><a>{0}</a></li>", PagerItemTemplate = "<li>{0}</li>", Id = "mvcpager" })
</div>